#include<stdio.h>
int main()
{
	int a= 0;
	int n = 0;
	scanf_s("%d%d", &a, &n);
	int ret = 0;
	int sum = 0;
	for (int i = 0; i <n; i++) {
		ret = ret * 10 + a;
		sum = sum + ret;
	}
	printf("%d", sum);
	return 0;
}